package po.entity;

import po.enums.ParamValueType;

import java.util.List;

/**
 * Created by guowei on 2019/6/9.
 */
public class ParamValue {
    private ParamValueType type;
    private List<String> valueEnum;
    private double max;
    private double min;

    public ParamValue(ParamValueType type, List<String> valueEnum, double max, double min) {
        this.type = type;
        this.valueEnum = valueEnum;
        this.max = max;
        this.min = min;
    }

    public ParamValueType getType() {
        return type;
    }

    public void setType(ParamValueType type) {
        this.type = type;
    }

    public List<String> getValueEnum() {
        return valueEnum;
    }

    public void setValueEnum(List<String> valueEnum) {
        this.valueEnum = valueEnum;
    }

    public double getMax() {
        return max;
    }

    public void setMax(double max) {
        this.max = max;
    }

    public double getMin() {
        return min;
    }

    public void setMin(double min) {
        this.min = min;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("PARAMVALUE<Type:");
        sb.append(this.type);
        sb.append(", ValueEnum: <");
        for (int i=0; i<this.valueEnum.size(); i++) {
            sb.append(this.valueEnum.get(i));
            if(i != this.valueEnum.size()-1){
                sb.append(", ");
            }
        }
        sb.append(">, Max: ");
        sb.append(this.max);
        sb.append(", Min: ");
        sb.append(this.min);
        sb.append(">");
        return sb.toString();
    }
}
